﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace Team4Mock.UserControl.Service
{
    public partial class ViewAll : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                pnView.Visible = true;
                pnAdd.Visible = false;
                DataTable dt = new DataTable();

                dt.Columns.Add("ID", typeof(int));
                dt.Columns.Add("Service Name");
                dt.Columns.Add("Description");
                dt.Columns.Add("Service Type");
                dt.Columns.Add("Contact");
                dt.Columns.Add("Is Active");


                dt.Rows.Add(1, "ZAdsadsadasdas", "3223232", "dasdasd", "Adasdas", "Yes");
                dt.Rows.Add(2, "CBsadsadasdas", "3223232", "dasdasd", "Bdasdas", "Yes");
                dt.Rows.Add(3, "FBdsadsadasdas", "3223232", "dasdasd", "Cdasdas", "Yes");
                dt.Rows.Add(4, "GDdsadsadasdas", "3223232", "dasdasd", "Ddasdas", "Yes");
                dt.Rows.Add(5, "AEdsadsadasdas", "3223232", "dasdasd", "Edasdas", "Yes");
                dt.Rows.Add(6, "KFdsadsadasdas", "3223232", "dasdasd", "Fdasdas", "Yes");
                dt.Rows.Add(7, "BGdsadsadasdas", "3223232", "dasdasd", "Gdasdas", "Yes");
                gvService.DataSource = dt;
                gvService.DataBind();
            }
        }
        protected void btnCreate_Click(object sender, EventArgs e)
        {
            pnView.Visible = false;
            pnAdd.Visible = true;
        }
    }
}